<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">

<body background="/img/background.jpg" style="background-size: cover">

<div th:fragment="copy">
    <header>
        <nav class="navbar navbar-default navbar-static-top" role="navigation">
            <div class="navigation">
                <div class="container">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse.collapse">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <div class="navbar-brand">
                            <a href="index.html"><h1><span>花</span>意网</h1></a>
                        </div>
                    </div>

                    <div class="navbar-collapse collapse">
                        <div class="menu">
                            <ul class="nav nav-tabs" role="tablist">
                                <li role="presentation"><a href="/" class="active">首页</a></li>
                                <li role="presentation"><a href="/services" >插花</a></li>
                                <li role="presentation"><a href="/blog">花意</a></li>
                                <li role="presentation"><a href="/portfolio">花类</a></li>
                                <li role="presentation" th:if="${session.user == null}"><a href="/login">登陆</a></li>
                                <li class="dropdown" th:if="${session.user != null}">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" >
                                        <span th:text="${session.user.getName()}"></span>
                                        <span class="caret"></span>
                                    </a>
                                    <ul class="dropdown-menu"  aria-labelledby="dropdownMenu3">
                                        <li class="dropdown-header">Personal Zone</li>
                                        <li><a href="/person">个人信息</a></li>
                                        <li class="dropdown-header">Login/Out</li>
                                        <li><a href="/logout">退出登录</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </nav>
    </header>
</div>

</body>

</html>